import pygame
from hexconfig import *


pygame.init()

print "Training DataSet based on number of units"
clock = pygame.time.Clock()
clock.tick()
screen = pygame.display.set_mode((SWIDTH,SHEIGHT))#,pygame.FULLSCREEN)#,pygame.HWSURFACE)

dh = DataHandler()
ds = dh.autoLoadDataSet()

ds.fleshOutEdges()
dh.autoSaveDataSet(ds)

for key in ds.nodes.keys():
    totals = numberOfUnits(key)
    diff = (totals[0]-totals[1])
    #util =
    #ds.nodes[key].addUtil(util, .20)
    if ds.nodes[key].util() != 0.0:
        print ds.nodes[key], totals

"""
for i in range(9):
    print i,
    for j in range(9):
        diff = i-j
        util = 
        print util,
    print
"""